1. Technical Field
The present disclosure relates generally to dynamically hooking and de-hooking application code.
2. Background Art
Instrumentation of software application code is a process of inserting additional instructions into the code stream to enable measurement of one or more properties of the code while executing in an environment. This enables visibility into processor and memory usage of applications on a given system. But it is not usually possible to view what code is executing within a running application. A debugger may allow a step-through of code to view code execution, but this requires a debugger to be installed and knowledge of where to place appropriate break points. Debugging also interrupts normal program flow at the break points and only one debugger may be used at a time.
Applications can be written in native code, managed code, or in a mixture of both managed and native code. Current techniques for instrumenting applications do not provide an ability to instrument both of these levels of code, or the ability to remove the instrumentation without stopping the application. Visibility into other levels of instrumentation or calls across boundaries to native code is not currently possible. Further, in managed or Just-In-Time (JIT) compiled code, system calls, library calls, and internal calls are not visible with current instrumentation techniques.
The present disclosure will be described with reference to the accompanying drawings. Generally, the drawing in which an element first appears is typically indicated by the leftmost digit(s) in the corresponding reference number.